package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * jiang bai ping
 *
 * @Email 526666031@qq.com
 * @Detail 权限组
 */
@Data
@Alias("PermissionAuthority")
@TableName(value = "permission_authority")
@ApiModel(value = "权限组")
public class PermissionAuthority extends BaseModel<PermissionAuthority> implements Serializable {

    @ApiModelProperty(value = "id标识")
    @TableId(value = "`permission_authority_id`", type = IdType.ASSIGN_UUID)
    private String permissionAuthorityId;

    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "`create_date_time`", fill = FieldFill.INSERT)
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "更新时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "`update_date_time`", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "创建人名称")
    @TableField(value = "`create_user_name`", fill = FieldFill.INSERT)
    private String createUserName;

    @ApiModelProperty(value = "更新人名称")
    @TableField(value = "`update_user_name`", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;

    @ApiModelProperty(value = "权限名称")
    @TableField(value = "`auth_name`")
    private String authName;

    @ApiModelProperty(value = "排序")
    @TableField(value = "`sort_number`")
    private Integer sortNumber;

    @ApiModelProperty(value = "所属公司id")
    @TableField(value = "`company_id`")
    private String companyId;

    @ApiModelProperty(value = "是否允许编辑")
    @TableField(value = "`is_allow_edit`")
    private Boolean isAllowEdit;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "`is_del`")
    private Boolean isDel;

    @ApiModelProperty(value = "权限组ID")
    @TableField(value = "`permission_group_id`")
    private String permissionGroupId;

    @Version
    @ApiModelProperty(value = "版本号")
    @TableField(value = "`version`", fill = FieldFill.INSERT)
    private Integer version;
}
